export default {
	//获取现在对应的时间，格式YYYY-MM-DD
	getNowFormatDate() {
		var timeStamp = new Date().getTime();
		var date = new Date(timeStamp);
		console.log(date); //结果为：Tue Apr 02 2019 07:49:23 GMT+0800 (中国标准时间)
		var seperator1 = "-";
		var year = date.getFullYear();
		var month = date.getMonth() + 1;
		var strDate = date.getDate();
		if (month >= 1 && month <= 9) {
			month = month;
		}
		if (strDate >= 0 && strDate <= 9) {
			strDate = strDate;
		}
		var currentdate = year + seperator1 + month + seperator1 + strDate;
		return currentdate;

	},
	//获取现在对应的时间，格式YYYY/MM/DD W
	getNowTimeDate() {
		var timeStamp = new Date().getTime();
		var date = new Date(timeStamp);
		console.log(date); //结果为：Tue Apr 02 2019 07:49:23 GMT+0800 (中国标准时间)
		var seperator1 = "/";
		var year = date.getFullYear();
		var month = date.getMonth() + 1;
		var strDate = date.getDate();
		if (month >= 1 && month <= 9) {
			month = month;
		}
		if (strDate >= 0 && strDate <= 9) {
			strDate = strDate;
		}
		var currentdate = year + seperator1 + month + seperator1 + strDate;
		var datas = new Date().getDay()
		var week = ['日', '一', '二', '三', '四', '五', '六']
		return currentdate +' '+week[datas]
	}
}
